package com.probiz.estore.common.model.order.base;

import java.io.Serializable;
import com.probiz.estore.Constants;
import com.probiz.estore.core.model.BaseObject;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;

/**
 * OrderDelivery Base Java Bean, base class for the model, mapped directly to database table
 * 
 * Avoid changing this file if not necessary, will be overwritten. 
 *
 */
public class OrderDeliveryTbl extends BaseObject implements Serializable {

    protected Integer orderDeliveryId;
	protected String orderDeliveryName;
	protected String shipperName;
	protected String regionFullName;
	protected Integer regionId;
	protected String address;
	protected String zipCode;
	protected String mobilephone;
	protected String telephone;
	protected Short isDefault;
	protected String remarks;
	protected Integer sortOrder;
	protected Short status;
	protected java.util.Date createTime;
	protected java.util.Date updateTime;
	protected Integer version;


	/**
	 * Default Empty Constructor for class OrderDelivery
	 */
	public OrderDeliveryTbl () {
		super();
	}
	
	/**
	 * Default Key Fields Constructor for class OrderDelivery
	 */
	public OrderDeliveryTbl (
		 Integer in_orderDeliveryId
        ) {
		this.setOrderDeliveryId(in_orderDeliveryId);
    }

    

	/**
	 * 自增的唯一标识	 * @return Integer
     * @hibernate.id column="orderDeliveryId" type="java.lang.Integer" generator-class="native"
	 */
	public Integer getOrderDeliveryId() {
		return this.orderDeliveryId;
	}
	
	/**
	 * Set the orderDeliveryId
	 */	
	public void setOrderDeliveryId(Integer aValue) {
		this.orderDeliveryId = aValue;
	}	

	/**
	 * 发货地址名称	 * @return String
	 * @hibernate.property column="orderDeliveryName" type="java.lang.String" length="50" not-null="true" unique="false"
	 */
	public String getOrderDeliveryName() {
		return this.orderDeliveryName;
	}
	
	/**
	 * Set the orderDeliveryName
	 * @spring.validator type="required"
	 */	
	public void setOrderDeliveryName(String aValue) {
		this.orderDeliveryName = aValue;
	}	

	/**
	 * 发货人姓名	 * @return String
	 * @hibernate.property column="shipperName" type="java.lang.String" length="100" not-null="true" unique="false"
	 */
	public String getShipperName() {
		return this.shipperName;
	}
	
	/**
	 * Set the shipperName
	 * @spring.validator type="required"
	 */	
	public void setShipperName(String aValue) {
		this.shipperName = aValue;
	}	

	
	public String getRegionFullName() {
		return regionFullName;
	}

	public void setRegionFullName(String regionFullName) {
		this.regionFullName = regionFullName;
	}

	public Integer getRegionId() {
		return regionId;
	}

	public void setRegionId(Integer regionId) {
		this.regionId = regionId;
	}

	/**
	 * 详细地址	 * @return String
	 * @hibernate.property column="address" type="java.lang.String" length="200" not-null="true" unique="false"
	 */
	public String getAddress() {
		return this.address;
	}
	
	/**
	 * Set the address
	 * @spring.validator type="required"
	 */	
	public void setAddress(String aValue) {
		this.address = aValue;
	}	

	/**
	 * 邮政编码	 * @return String
	 * @hibernate.property column="zipCode" type="java.lang.String" length="20" not-null="false" unique="false"
	 */
	public String getZipCode() {
		return this.zipCode;
	}
	
	/**
	 * Set the zipCode
	 */	
	public void setZipCode(String aValue) {
		this.zipCode = aValue;
	}	

	/**
	 * 手机号码	 * @return String
	 * @hibernate.property column="mobilephone" type="java.lang.String" length="100" not-null="true" unique="false"
	 */
	public String getMobilephone() {
		return this.mobilephone;
	}
	
	/**
	 * Set the mobilephone
	 * @spring.validator type="required"
	 */	
	public void setMobilephone(String aValue) {
		this.mobilephone = aValue;
	}	

	/**
	 * 电话号码	 * @return String
	 * @hibernate.property column="telephone" type="java.lang.String" length="100" not-null="false" unique="false"
	 */
	public String getTelephone() {
		return this.telephone;
	}
	
	/**
	 * Set the telephone
	 */	
	public void setTelephone(String aValue) {
		this.telephone = aValue;
	}	

	/**
	 * 是否为默认	 * @return Short
	 * @hibernate.property column="isDefault" type="java.lang.Short" length="5" not-null="false" unique="false"
	 */
	public Short getIsDefault() {
		return this.isDefault;
	}
	
	/**
	 * Set the isDefault
	 */	
	public void setIsDefault(Short aValue) {
		this.isDefault = aValue;
	}	

	/**
	 * 备注	 * @return String
	 * @hibernate.property column="remarks" type="java.lang.String" length="1024" not-null="false" unique="false"
	 */
	public String getRemarks() {
		return this.remarks;
	}
	
	/**
	 * Set the remarks
	 */	
	public void setRemarks(String aValue) {
		this.remarks = aValue;
	}	

	/**
	 * 排序	 * @return Integer
	 * @hibernate.property column="sortOrder" type="java.lang.Integer" length="10" not-null="false" unique="false"
	 */
	public Integer getSortOrder() {
		return this.sortOrder;
	}
	
	/**
	 * Set the sortOrder
	 */	
	public void setSortOrder(Integer aValue) {
		this.sortOrder = aValue;
	}	

	/**
	 * 状态	 * @return Short
	 * @hibernate.property column="status" type="java.lang.Short" length="5" not-null="false" unique="false"
	 */
	public Short getStatus() {
		return this.status;
	}
	
	/**
	 * Set the status
	 */	
	public void setStatus(Short aValue) {
		this.status = aValue;
	}	

	/**
	 * 创建时间	 * @return java.util.Date
	 * @hibernate.property column="createTime" type="java.util.Date" length="19" not-null="true" unique="false"
	 */
	public java.util.Date getCreateTime() {
		return this.createTime;
	}
	
	/**
	 * Set the createTime
	 * @spring.validator type="required"
	 */	
	public void setCreateTime(java.util.Date aValue) {
		this.createTime = aValue;
	}	

	/**
	 * 更新时间	 * @return java.util.Date
	 * @hibernate.property column="updateTime" type="java.util.Date" length="19" not-null="true" unique="false"
	 */
	public java.util.Date getUpdateTime() {
		return this.updateTime;
	}
	
	/**
	 * Set the updateTime
	 * @spring.validator type="required"
	 */	
	public void setUpdateTime(java.util.Date aValue) {
		this.updateTime = aValue;
	}	

	/**
	 * 版本记录	 * @return Integer
	 * @hibernate.property column="version" type="java.lang.Integer" length="10" not-null="true" unique="false"
	 */
	public Integer getVersion() {
		return this.version;
	}
	
	/**
	 * Set the version
	 * @spring.validator type="required"
	 */	
	public void setVersion(Integer aValue) {
		this.version = aValue;
	}	

	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof OrderDeliveryTbl)) {
			return false;
		}
		OrderDeliveryTbl rhs = (OrderDeliveryTbl) object;
		return new EqualsBuilder()
				.append(this.orderDeliveryId, rhs.orderDeliveryId)
				.append(this.orderDeliveryName, rhs.orderDeliveryName)
				.append(this.shipperName, rhs.shipperName)
				.append(this.address, rhs.address)
				.append(this.zipCode, rhs.zipCode)
				.append(this.mobilephone, rhs.mobilephone)
				.append(this.telephone, rhs.telephone)
				.append(this.isDefault, rhs.isDefault)
				.append(this.remarks, rhs.remarks)
				.append(this.sortOrder, rhs.sortOrder)
				.append(this.status, rhs.status)
				.append(this.createTime, rhs.createTime)
				.append(this.updateTime, rhs.updateTime)
				.append(this.version, rhs.version)
				.isEquals();
	}

	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(-82280557, -700257973)
				.append(this.orderDeliveryId) 
				.append(this.orderDeliveryName) 
				.append(this.shipperName) 
				.append(this.address) 
				.append(this.zipCode) 
				.append(this.mobilephone) 
				.append(this.telephone) 
				.append(this.isDefault) 
				.append(this.remarks) 
				.append(this.sortOrder) 
				.append(this.status) 
				.append(this.createTime) 
				.append(this.updateTime) 
				.append(this.version) 
				.toHashCode();
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this)
				.append("orderDeliveryId", this.orderDeliveryId) 
				.append("orderDeliveryName", this.orderDeliveryName) 
				.append("shipperName", this.shipperName) 
				.append("address", this.address) 
				.append("zipCode", this.zipCode) 
				.append("mobilephone", this.mobilephone) 
				.append("telephone", this.telephone) 
				.append("isDefault", this.isDefault) 
				.append("remarks", this.remarks) 
				.append("sortOrder", this.sortOrder) 
				.append("status", this.status) 
				.append("createTime", this.createTime) 
				.append("updateTime", this.updateTime) 
				.append("version", this.version) 
				.toString();
	}

	/**
	 * Return the name of the first key column
	 */
	public String getFirstKeyColumnName() {
		return "orderDeliveryId";
	}
	
	/**
	 * Return the Id (pk) of the entity, must be Integer
	 */
	public Integer getId() {
		return orderDeliveryId;
	}

}